<?php

	session_start();

	// change to the local lib directory
	chdir( "../lib/" );

	// include the required classes
	require_once( "Config.php"   );
	require_once( "Dash.php"     );
	require_once( "Database.php" );
	require_once( "Request.php"  );
	
	// load config
	$config = Config::load( "../config/config.common.xml" );

	// load dash
	$dash = new Dash( $config );
	
	// find out what to do
	$request = new Request( $_SERVER["REQUEST_URI"] );
	
	// make request and exit
	$dash->execute( $request->controller, $request->method, $request->params, $request->requested_response );
	
	exit();
?>
